xend: Fix checkname so that it detects duplicate domains.
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 25 May 2007 09:53:07 +0000 (10:53 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Fri, 25 May 2007 09:53:07 +0000 (10:53 +0100)
Signed-off-by: Mats Petersson <mats.petersson@amd.com>
tools/python/xen/xend/XendDomainInfo.py

index f7b8dda3db1225f291c269e280fe2bd0e017b015..3845a7ddade9bdb1040573ed30f3e93e19c19d27 100644 (file)
@@ -2086,7 +2086,7 @@ class XendDomainInfo:
             raise VmError('Invalid VM Name')
 
         dom =  XendDomain.instance().domain_lookup_nr(name)
-        if dom and dom.info['uuid'] != self.info['uuid']:
+        if dom and dom.domid != self.domid:
             raise VmError("VM name '%s' already exists%s" %
                           (name,
                            dom.domid is not None and